package com.qiangqiang.task.server.mapper;

import com.qiangqiang.task.server.entity.Comments;
import com.qiangqiang.task.server.entity.MomentsComments;
import com.qiangqiang.task.server.mapper.provider.CommentsProvider;
import com.qiangqiang.task.server.mapper.provider.MomentsCommentsProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * @program: task
 * @description:
 * @author: Sky.lin
 * @create: 2019-01-06 17:14
 **/
@Mapper
public interface MomentsCommentsMapper {

    @InsertProvider(type = MomentsCommentsProvider.class, method = "insertMomentsComments")
    int insertMomentsComments(@Param("momentsComments") MomentsComments momentsComments);

    @SelectProvider(type = MomentsCommentsProvider.class, method = "queryAllCommentsByMomentsId")
    List<MomentsComments> queryAllCommentsByMomentsId(@Param("momentsId") long momentsId);
}
